package cn.com.flat.utils;

import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URL;
import java.util.Properties;

/**
 * 标题: 获取config配置文件类
 * <p>
 * 描述: 获取config配置文件类
 * <p>
 * 版权：Copyright (c) 2016
 * <p>
 *
 * @author 张顺
 * @version 1.0
 * @created 2016/11/09/23:35
 */
public class IpmanConfig {
    private static Properties properties = new Properties();

    public static void load(InputStream inputStream)throws Exception{
        properties.load(inputStream);
    }

    public static String getProperty(String key){
        return getProperty(key,"");
    }

    public static String getProperty(String key,String defaultValue){
        return properties.getProperty(key,defaultValue);
    }
}
